home *** CD-ROM | disk | FTP | other *** search
- Path: access1.digex.net!not-for-mail
- From: ell@access1.digex.net (Ell)
- Newsgroups: comp.lang.c++
- Subject: Re: HELP! cin.getline to cin
- Date: 23 Feb 1996 02:46:54 GMT
- Organization: The Universe
- Message-ID: <4gj9qu$s92@news4.digex.net>
- References: <4gfnb0$2a6@daily-planet.execpc.com>
- NNTP-Posting-Host: access1.digex.net
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- Sherri Scalish (scalish@execpc.com) wrote:
- : I am a C++ student trying to use the cin.getline and cin stream
- : operators to load in user input. The data I am loading is first
- : character strings, then floats, integers, then back to character
- : strings. Everything works fine with my cin.getlines until after I use
- : the cin to load a integer or float, then nothing happens when I try to
- : use the cin.getline function for the rest of the input. Any ideas to
- : share with me?
-
- Get the input line using cin.getline() and then use the isalnum(c) and
- isdidgit(c) functions in ctype.h to parse the line. Probably the easiest
- way to do this, imo.
-
- Elliott
-